package com.zyong.encryption.client.config;

import lombok.Data;

/**
 * 
 * @author xiaoyu
 */
@Data
public class NettyConfig {
    
    private String host;
    
    private Integer port;

    /**
     * 提供不同的序列化对象. {@linkplain SerializeProtocolEnum}
     */
    private String serializer = "kryo";

    /**
     * netty 传输的序列化协议.
     */
    private String nettySerializer = "kryo";

    /**
     * 延迟时间.
     */
    private int delayTime = 30;

    /**
     * netty 工作线程大小.
     */
    private int nettyThreadMax = Runtime.getRuntime().availableProcessors() << 1;

    /**
     * 心跳时间 默认10秒.
     */
    private int heartTime = 10;

    /**
     * 最大重试次数.
     */
    private int retryMax = 10;

    /**
     * disruptor bufferSize.
     */
    private int bufferSize = 4096;

}
